// **********************************************************************
//
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.2.1

package Demo;

public final class BodyStruct implements java.lang.Cloneable
{
    public int id;

    public double radius;

    public double posX;

    public double posY;

    public double posZ;

    public BodyStruct()
    {
    }

    public BodyStruct(int id, double radius, double posX, double posY, double posZ)
    {
        this.id = id;
        this.radius = radius;
        this.posX = posX;
        this.posY = posY;
        this.posZ = posZ;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        BodyStruct _r = null;
        try
        {
            _r = (BodyStruct)rhs;
        }
        catch(ClassCastException ex)
        {
        }

        if(_r != null)
        {
            if(id != _r.id)
            {
                return false;
            }
            if(radius != _r.radius)
            {
                return false;
            }
            if(posX != _r.posX)
            {
                return false;
            }
            if(posY != _r.posY)
            {
                return false;
            }
            if(posZ != _r.posZ)
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 0;
        __h = 5 * __h + id;
        __h = 5 * __h + (int)java.lang.Double.doubleToLongBits(radius);
        __h = 5 * __h + (int)java.lang.Double.doubleToLongBits(posX);
        __h = 5 * __h + (int)java.lang.Double.doubleToLongBits(posY);
        __h = 5 * __h + (int)java.lang.Double.doubleToLongBits(posZ);
        return __h;
    }

    public java.lang.Object
    clone()
    {
        java.lang.Object o = null;
        try
        {
            o = super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return o;
    }

    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeInt(id);
        __os.writeDouble(radius);
        __os.writeDouble(posX);
        __os.writeDouble(posY);
        __os.writeDouble(posZ);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        id = __is.readInt();
        radius = __is.readDouble();
        posX = __is.readDouble();
        posY = __is.readDouble();
        posZ = __is.readDouble();
    }
}
